/*
 * create:2016年4月16日 上午11:08:49
 * author:wangds  
 */
package net.wangds.comp.endpoint.http;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.wangds.common.GeneralParentObject;

/**
 * .
 * @author wangds
 *
 */
public class DefaultHttpAccessContext extends GeneralParentObject implements HttpAccessContext{

  private HttpServletRequest req;
  private HttpServletResponse resp;
  public DefaultHttpAccessContext(HttpServletRequest req, HttpServletResponse resp){
    this.req = req;
    this.resp = resp;
  }
  public DefaultHttpAccessContext(HttpEndPoint ep){
    this.req=ep.getHttpRequest();
    this.resp=ep.getHttpResponse();
  }
  /*
   * @see net.wangds.comp.endpoint.http.HttpAccessContext#getRequest()
   * @author wangds 2016年4月16日 上午11:09:19.
   */
  @Override
  public HttpServletRequest getRequest() {
    return req;
  }

  /*
   * @see net.wangds.comp.endpoint.http.HttpAccessContext#getResponse()
   * @author wangds 2016年4月16日 上午11:09:19.
   */
  @Override
  public HttpServletResponse getResponse() {
    return resp;
  }

}
